<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Gearman</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.ftp-systype.html">« ftp_systype</a></li>
      <li style="float: right;"><a href="intro.gearman.html">简介 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="refs.remote.other.html">其它服务</a></li>
    <li>Gearman</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="book.gearman" class="book">
 
 <h1 class="title">Gearman</h1>
 

 

 







 







 







 






 






 






 






 







<ul class="chunklist chunklist_book"><li><a href="intro.gearman.html">简介</a></li><li><a href="gearman.setup.html">安装/配置</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="gearman.requirements.html">需求</a></li><li><a href="gearman.installation.html">安装</a></li><li><a href="gearman.configuration.html">运行时配置</a></li><li><a href="gearman.resources.html">资源类型</a></li></ul></li><li><a href="gearman.constants.html">预定义常量</a></li><li><a href="gearman.examples.html">范例</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="gearman.examples-reverse.html">Basic usage</a></li><li><a href="gearman.examples-reverse-bg.html">Basic Gearman client and worker, background</a></li><li><a href="gearman.examples-reverse-task.html">Basic Gearman client and worker, submitting tasks</a></li></ul></li><li><a href="class.gearmanclient.html">GearmanClient</a> — The GearmanClient class<ul class="chunklist chunklist_book chunklist_children"><li><a href="gearmanclient.addoptions.html">GearmanClient::addOptions</a> — Add client options</li><li><a href="gearmanclient.addserver.html">GearmanClient::addServer</a> — Add a job server to the client</li><li><a href="gearmanclient.addservers.html">GearmanClient::addServers</a> — Add a list of job servers to the client</li><li><a href="gearmanclient.addtask.html">GearmanClient::addTask</a> — Add a task to be run in parallel</li><li><a href="gearmanclient.addtaskbackground.html">GearmanClient::addTaskBackground</a> — Add a background task to be run in parallel</li><li><a href="gearmanclient.addtaskhigh.html">GearmanClient::addTaskHigh</a> — Add a high priority task to run in parallel</li><li><a href="gearmanclient.addtaskhighbackground.html">GearmanClient::addTaskHighBackground</a> — Add a high priority background task to be run in parallel</li><li><a href="gearmanclient.addtasklow.html">GearmanClient::addTaskLow</a> — Add a low priority task to run in parallel</li><li><a href="gearmanclient.addtasklowbackground.html">GearmanClient::addTaskLowBackground</a> — Add a low priority background task to be run in parallel</li><li><a href="gearmanclient.addtaskstatus.html">GearmanClient::addTaskStatus</a> — Add a task to get status</li><li><a href="gearmanclient.clearcallbacks.html">GearmanClient::clearCallbacks</a> — Clear all task callback functions</li><li><a href="gearmanclient.clone.html">GearmanClient::clone</a> — Create a copy of a GearmanClient object</li><li><a href="gearmanclient.construct.html">GearmanClient::__construct</a> — Create a GearmanClient instance</li><li><a href="gearmanclient.context.html">GearmanClient::context</a> — Get the application context</li><li><a href="gearmanclient.data.html">GearmanClient::data</a> — Get the application data (deprecated)</li><li><a href="gearmanclient.do.html">GearmanClient::do</a> — Run a single task and return a result [deprecated]</li><li><a href="gearmanclient.dobackground.html">GearmanClient::doBackground</a> — Run a task in the background</li><li><a href="gearmanclient.dohigh.html">GearmanClient::doHigh</a> — Run a single high priority task</li><li><a href="gearmanclient.dohighbackground.html">GearmanClient::doHighBackground</a> — Run a high priority task in the background</li><li><a href="gearmanclient.dojobhandle.html">GearmanClient::doJobHandle</a> — Get the job handle for the running task</li><li><a href="gearmanclient.dolow.html">GearmanClient::doLow</a> — Run a single low priority task</li><li><a href="gearmanclient.dolowbackground.html">GearmanClient::doLowBackground</a> — Run a low priority task in the background</li><li><a href="gearmanclient.donormal.html">GearmanClient::doNormal</a> — Run a single task and return a result</li><li><a href="gearmanclient.dostatus.html">GearmanClient::doStatus</a> — Get the status for the running task</li><li><a href="gearmanclient.echo.html">GearmanClient::echo</a> — Send data to all job servers to see if they echo it back [deprecated]</li><li><a href="gearmanclient.error.html">GearmanClient::error</a> — Returns an error string for the last error encountered</li><li><a href="gearmanclient.geterrno.html">GearmanClient::getErrno</a> — Get an errno value</li><li><a href="gearmanclient.jobstatus.html">GearmanClient::jobStatus</a> — Get the status of a background job</li><li><a href="gearmanclient.ping.html">GearmanClient::ping</a> — Send data to all job servers to see if they echo it back</li><li><a href="gearmanclient.removeoptions.html">GearmanClient::removeOptions</a> — Remove client options</li><li><a href="gearmanclient.returncode.html">GearmanClient::returnCode</a> — Get the last Gearman return code</li><li><a href="gearmanclient.runtasks.html">GearmanClient::runTasks</a> — Run a list of tasks in parallel</li><li><a href="gearmanclient.setclientcallback.html">GearmanClient::setClientCallback</a> — Callback function when there is a data packet for a task (deprecated)</li><li><a href="gearmanclient.setcompletecallback.html">GearmanClient::setCompleteCallback</a> — Set a function to be called on task completion</li><li><a href="gearmanclient.setcontext.html">GearmanClient::setContext</a> — Set application context</li><li><a href="gearmanclient.setcreatedcallback.html">GearmanClient::setCreatedCallback</a> — Set a callback for when a task is queued</li><li><a href="gearmanclient.setdata.html">GearmanClient::setData</a> — Set application data (deprecated)</li><li><a href="gearmanclient.setdatacallback.html">GearmanClient::setDataCallback</a> — Callback function when there is a data packet for a task</li><li><a href="gearmanclient.setexceptioncallback.html">GearmanClient::setExceptionCallback</a> — Set a callback for worker exceptions</li><li><a href="gearmanclient.setfailcallback.html">GearmanClient::setFailCallback</a> — Set callback for job failure</li><li><a href="gearmanclient.setoptions.html">GearmanClient::setOptions</a> — Set client options</li><li><a href="gearmanclient.setstatuscallback.html">GearmanClient::setStatusCallback</a> — Set a callback for collecting task status</li><li><a href="gearmanclient.settimeout.html">GearmanClient::setTimeout</a> — Set socket I/O activity timeout</li><li><a href="gearmanclient.setwarningcallback.html">GearmanClient::setWarningCallback</a> — Set a callback for worker warnings</li><li><a href="gearmanclient.setworkloadcallback.html">GearmanClient::setWorkloadCallback</a> — Set a callback for accepting incremental data updates</li><li><a href="gearmanclient.timeout.html">GearmanClient::timeout</a> — Get current socket I/O activity timeout value</li><li><a href="gearmanclient.wait.html">GearmanClient::wait</a> — Wait for I/O activity on all connections in a client</li></ul></li><li><a href="class.gearmanjob.html">GearmanJob</a> — The GearmanJob class<ul class="chunklist chunklist_book chunklist_children"><li><a href="gearmanjob.complete.html">GearmanJob::complete</a> — Send the result and complete status (deprecated)</li><li><a href="gearmanjob.construct.html">GearmanJob::__construct</a> — Create a GearmanJob instance</li><li><a href="gearmanjob.data.html">GearmanJob::data</a> — Send data for a running job (deprecated)</li><li><a href="gearmanjob.exception.html">GearmanJob::exception</a> — Send exception for running job (deprecated)</li><li><a href="gearmanjob.fail.html">GearmanJob::fail</a> — Send fail status (deprecated)</li><li><a href="gearmanjob.functionname.html">GearmanJob::functionName</a> — Get function name</li><li><a href="gearmanjob.handle.html">GearmanJob::handle</a> — Get the job handle</li><li><a href="gearmanjob.returncode.html">GearmanJob::returnCode</a> — Get last return code</li><li><a href="gearmanjob.sendcomplete.html">GearmanJob::sendComplete</a> — Send the result and complete status</li><li><a href="gearmanjob.senddata.html">GearmanJob::sendData</a> — Send data for a running job</li><li><a href="gearmanjob.sendexception.html">GearmanJob::sendException</a> — Send exception for running job (exception)</li><li><a href="gearmanjob.sendfail.html">GearmanJob::sendFail</a> — Send fail status</li><li><a href="gearmanjob.sendstatus.html">GearmanJob::sendStatus</a> — Send status</li><li><a href="gearmanjob.sendwarning.html">GearmanJob::sendWarning</a> — Send a warning</li><li><a href="gearmanjob.setreturn.html">GearmanJob::setReturn</a> — Set a return value</li><li><a href="gearmanjob.status.html">GearmanJob::status</a> — Send status (deprecated)</li><li><a href="gearmanjob.unique.html">GearmanJob::unique</a> — Get the unique identifier</li><li><a href="gearmanjob.warning.html">GearmanJob::warning</a> — Send a warning (deprecated)</li><li><a href="gearmanjob.workload.html">GearmanJob::workload</a> — Get workload</li><li><a href="gearmanjob.workloadsize.html">GearmanJob::workloadSize</a> — Get size of work load</li></ul></li><li><a href="class.gearmantask.html">GearmanTask</a> — The GearmanTask class<ul class="chunklist chunklist_book chunklist_children"><li><a href="gearmantask.construct.html">GearmanTask::__construct</a> — Create a GearmanTask instance</li><li><a href="gearmantask.create.html">GearmanTask::create</a> — Create a task (deprecated)</li><li><a href="gearmantask.data.html">GearmanTask::data</a> — Get data returned for a task</li><li><a href="gearmantask.datasize.html">GearmanTask::dataSize</a> — Get the size of returned data</li><li><a href="gearmantask.function.html">GearmanTask::function</a> — Get associated function name (deprecated)</li><li><a href="gearmantask.functionname.html">GearmanTask::functionName</a> — Get associated function name</li><li><a href="gearmantask.isknown.html">GearmanTask::isKnown</a> — Determine if task is known</li><li><a href="gearmantask.isrunning.html">GearmanTask::isRunning</a> — Test whether the task is currently running</li><li><a href="gearmantask.jobhandle.html">GearmanTask::jobHandle</a> — Get the job handle</li><li><a href="gearmantask.recvdata.html">GearmanTask::recvData</a> — Read work or result data into a buffer for a task</li><li><a href="gearmantask.returncode.html">GearmanTask::returnCode</a> — Get the last return code</li><li><a href="gearmantask.senddata.html">GearmanTask::sendData</a> — Send data for a task (deprecated)</li><li><a href="gearmantask.sendworkload.html">GearmanTask::sendWorkload</a> — Send data for a task</li><li><a href="gearmantask.taskdenominator.html">GearmanTask::taskDenominator</a> — Get completion percentage denominator</li><li><a href="gearmantask.tasknumerator.html">GearmanTask::taskNumerator</a> — Get completion percentage numerator</li><li><a href="gearmantask.unique.html">GearmanTask::unique</a> — Get the unique identifier for a task</li><li><a href="gearmantask.uuid.html">GearmanTask::uuid</a> — Get the unique identifier for a task (deprecated)</li></ul></li><li><a href="class.gearmanworker.html">GearmanWorker</a> — The GearmanWorker class<ul class="chunklist chunklist_book chunklist_children"><li><a href="gearmanworker.addfunction.html">GearmanWorker::addFunction</a> — Register and add callback function</li><li><a href="gearmanworker.addoptions.html">GearmanWorker::addOptions</a> — Add worker options</li><li><a href="gearmanworker.addserver.html">GearmanWorker::addServer</a> — Add a job server</li><li><a href="gearmanworker.addservers.html">GearmanWorker::addServers</a> — Add job servers</li><li><a href="gearmanworker.clone.html">GearmanWorker::clone</a> — Create a copy of the worker</li><li><a href="gearmanworker.construct.html">GearmanWorker::__construct</a> — Create a GearmanWorker instance</li><li><a href="gearmanworker.echo.html">GearmanWorker::echo</a> — Test job server response</li><li><a href="gearmanworker.error.html">GearmanWorker::error</a> — Get the last error encountered</li><li><a href="gearmanworker.geterrno.html">GearmanWorker::getErrno</a> — Get errno</li><li><a href="gearmanworker.options.html">GearmanWorker::options</a> — Get worker options</li><li><a href="gearmanworker.register.html">GearmanWorker::register</a> — Register a function with the job server</li><li><a href="gearmanworker.removeoptions.html">GearmanWorker::removeOptions</a> — Remove worker options</li><li><a href="gearmanworker.returncode.html">GearmanWorker::returnCode</a> — Get last Gearman return code</li><li><a href="gearmanworker.setid.html">GearmanWorker::setId</a> — Give the worker an identifier so it can be tracked when asking gearmand for the list of available workers</li><li><a href="gearmanworker.setoptions.html">GearmanWorker::setOptions</a> — Set worker options</li><li><a href="gearmanworker.settimeout.html">GearmanWorker::setTimeout</a> — Set socket I/O activity timeout</li><li><a href="gearmanworker.timeout.html">GearmanWorker::timeout</a> — Get socket I/O activity timeout</li><li><a href="gearmanworker.unregister.html">GearmanWorker::unregister</a> — Unregister a function name with the job servers</li><li><a href="gearmanworker.unregisterall.html">GearmanWorker::unregisterAll</a> — Unregister all function names with the job servers</li><li><a href="gearmanworker.wait.html">GearmanWorker::wait</a> — Wait for activity from one of the job servers</li><li><a href="gearmanworker.work.html">GearmanWorker::work</a> — Wait for and perform jobs</li></ul></li><li><a href="class.gearmanexception.html">GearmanException</a> — The GearmanException class</li></ul></div></div></div></body></html>